package com.cskaoyan.day1.collection;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author Common-zhou
 * @since 2023-02-28 09:13
 */
public class TestOrder {
    public static void main(String[] args) {
        Date date = new Date();
        long time = date.getTime();

        long date1 = time - 60*24 * 3600 * 1000L;
        Date date2 = new Date(date1);

        System.out.println(date2);

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println(simpleDateFormat.format(date2));

    }
}
